<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        var res =  Math.max(3,5,1);
        console.log(res);

        var arr  = [3,5,1];
        var res = Math.max(...arr);
        console.log(res);

        var arr1 = [1,2,3];
        var arr2 = [4,5];

   
        var newarr = [...arr1,...arr2,"hello"];
        console.log(newarr);


        let  lis = document.getElementsByTagName("li");
    
        [...lis].forEach(function(li){
            li.onclick = function(){
                console.log("hello");
            }
        })

        (function(){
            console.log(11)
        })();
        (function(){
            console.log(222)
        })()

        
        let obj1 = {
            myname: "张安",
            age: 20
        }
        let obj2 = {
            height: "178cm",
            age: 30
        }

        var newobj = {...obj1,...obj2};
        console.log(newobj);


        function fn(...args){
            // console.log(arguments);
            console.log(args);
        }

        fn(1,2,3)


        
       
        function fn(a,b,...args){
            console.log(args);
        }

        fn(1,2,3,4);

        let [a,b,...c] = [1,2,3,4];
        console.log(a,b,c);
    </script>
</body>
</html>